package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.work.WorkTypeBO;
import com.ymk.service.IWorkTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-06-12
 */
@Service
public class WorkTypeServiceImpl implements IWorkTypeService {

    @Override
    public WorkTypeBO get(Map param) {
    return this.daoRouter.queryForObject("WorkType.loadWorkType",param);
    }

    @Override
    public List<WorkTypeBO> list(Map param) {
        return this.daoRouter.query("WorkType.loadWorkType",param);
    }

    @Override
    public List<WorkTypeBO> listForPage(Map param) {
        return this.daoRouter.query("WorkType.loadWorkTypeForPage",param);
    }

    @Override
    public void post(WorkTypeBO param) {
        this.daoRouter.insert("AWorkType.insertWorkType",param);
    }

    @Override
    public void update(WorkTypeBO param) {
        this.daoRouter.update("AWorkType.updateWorkType",param);
    }

    @Override
    public void del(WorkTypeBO param) {
        this.daoRouter.update("AWorkType.delWorkType",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
